SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO





CREATE PROCEDURE [dbo].[usp_SearchEmployer]
    (
      @JOL_Employer_Account VARCHAR(50) ,
      @JOL_Employer_Name VARCHAR(50) ,
      @JOL_Employer_IsVIP BIT ,
      @JOL_Employer_IsSchoolCorperate BIT
    )
AS 
    SELECT  JOL_Employer_Account ,
            JOL_Employer_Name ,
            JOL_Employer_Linkman ,
            JOL_Employer_Mobile ,
            JOL_Employer_Email ,
            JOL_Employer_Phone ,
            JOL_Employer_Fax ,
            JOL_Employer_VerifyStatus ,
            JOL_Employer_IsSchoolCorperate ,
            JOL_Employer_IsVIP ,
            JOL_Employer_CredentialsFileLink
    FROM    dbo.JOL_Employer
    WHERE   ( JOL_Employer_Account LIKE '%' + @JOL_Employer_Account + '%' )
            AND ( JOL_Employer_Name LIKE '%' + @JOL_Employer_Name + '%' )
            AND JOL_Employer_IsVIP = @JOL_Employer_IsVIP
            AND JOL_Employer_IsSchoolCorperate = @JOL_Employer_IsSchoolCorperate
    ORDER BY JOL_Employer_VerifyStatus ASC ,
            JOL_Employer_IsVIP DESC ,
            JOL_Employer_AddTime DESC ,
            JOL_Employer_UpdateTime DESC





GO
